package com.silent.week.owner;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;

/**
 * @author liutao
 * Date 2021/3/30 10:18 上午
 * Description: 对外内存测试
 * Version: 1.0
 **/
public class DirectMemoryTest {


    public static void main(String[] args) {
        testDirectByteBuffer();
    }

    public static void testDirectByteBuffer(){

        List<ByteBuffer> list=new ArrayList<ByteBuffer>();

        while (true){
            ByteBuffer buffer=ByteBuffer.allocateDirect(1*1024*1024);
            list.add(buffer);
        }

    }
}
